package com.study.d5_thread_exer;

public class UseThread extends Thread {
    private Desk desk;

    public UseThread(String name, Desk desk) {
        super(name);
        this.desk = desk;
    }

    @Override
    public void run() {
        while (true) {

            try {
                desk.get();
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }
}
